<template>
  <div id="app">
   
     <router-view v-if="isRouterAlive"></router-view>
  </div>
</template>
<script>
import bus from '@/utils/bus';
export default {
  name: 'App',
  provide (){
     return {
       reload:this.reload,
       style: false
     }
  },
  data(){
    return {
       isRouterAlive:true
    }
  },
  created(){
    bus.$on('global_theme', (msg) => {    // 接收子组件传来 global_theme 的值
      console.log('99999msg',msg);
      this.style = msg;
    });
  },
  methods:{
    reload (){
       this.isRouterAlive = false
       this.$nextTick(function(){
          this.isRouterAlive = true
       })
    }
  },
  components:{
  }
}
</script>
<style>

</style>
